Ext.define('Admin.view.trade.ProgramController', {
	        extend : 'Admin.app.CrudController',
	        alias : 'controller.program',

	        onProgramRefresh : function(view, record, params) {
		        var me = this, vm = me.getViewModel();
		        var store = me.getStore('programStore');
		        store.proxy.extraParams = {
			        id : record.data.id
		        };
		        store.reload();
	        },

	        onInsertClick : function(btn) {
		        var me = this, grid = btn.ownerCt.ownerCt, parent = me.getViewModel().get('record');
		        if (!parent)
			        return;
		        var record = Ext.create(grid.getStore().model, {
			                id : null,
			                name : '新建交易品种',
			                market : parent.data.id
		                });
		        record.store = grid.getStore();
		        me.showDetail(grid.detail, record);
	        }
        });